CSI Report post Posted 09/03/2004 01:45 PM I'm running 5.2.1005 in my production system and I cannot get the date to play correctly. If I wanted to play January 5th, 1976, it says: "Fifth, January, Nineteen Hundred Seventy Six" even though I have specified that I want the month first (MMDDYY). Also, the year should be played as "Nineteen Seventy Six" when played as a year and currency or another number-type. If no fix is available for this, I can play the sounds I want using a series of Play modules and reference the needed sound files manually, but I wanted to ask about it before I put in that amount of work. Is this fixed in 5.2.3a? Thanks! Share this post Link to post
SupportTeam Report post Posted 09/03/2004 09:05 PM From: http://www.voiceguide.com/vghelp/html/modSayNumber.htm Need to change the way Say Number module speaks Amounts ? Users can edit the way in which the numbers are spoken, or even add their own Say Number functions by editing the file: lib_num2wav.vbs located in VoiceGuide's \system\vbs\ subdirectory. This is useful if it is required to say numbers/amounts in a language other then English. Please read the lib_num2wav.vbs file for more information. Changing it all around should be pretty easy - just change the order in which the sound files are sent back to VG. ie: in "Function DateMMDDYYYY(ByVal arg1)" change that line: DateMMDDYYYY = "month" & Left(arg1,2) & ".wav,place" & mid(arg1,3,2) & ".wav," & Number(right(arg1,4)) to be: DateMMDDYYYY = "place" & mid(arg1,3,2) & ".wav, & "month" & Left(arg1,2).wav," & Number(right(arg1,4)) or just create your own new function with the change... Share this post Link to post
corrigaj Report post Posted 06/27/2005 07:13 PM Just tried this on the system I have installed (Ver 5.2.4) and received an error. Could the line: DateMMDDYYYY = "place" & mid(arg1,3,2) & ".wav, & "month" & Left(arg1,2).wav," & Number(right(arg1,4)) be incorrect? Thanks! Share this post Link to post
SupportTeam Report post Posted 06/27/2005 11:42 PM The lib_num2wav.vbs which ships with v5.2.4 is correct and does not need to be changed. The "Date - DDMMYYYY" function in lib_num2wav.vbs installed in v5.2.4 looks like this: '###### 'name : Date - DDMMYYYY 'info : Say day, month, year 'arg1 : DDMMYYYY or DD/MM/YYYY: '###### Function DateMMDDYYYY(ByVal arg1) arg1 = replace(arg1, "/", "") If Len(arg1) < 8 Then Exit Function End If DateMMDDYYYY = "place" & Left(arg1,2) & ".wav,month" & mid(arg1,3,2) & ".wav," & Number(right(arg1,4)) End Function Share this post Link to post
corrigaj Report post Posted 06/28/2005 03:10 PM Changing it all around should be pretty easy - just change the order in which the sound files are sent back to VG. ie: in "Function DateMMDDYYYY(ByVal arg1)" change that line: What about changing vbs in Date - MMDDYYYY to say the date as: "April fifteenth,nineteen eighty four" Share this post Link to post
SupportTeam Report post Posted 06/28/2005 10:07 PM OK, you have two options: 1. Just change: DateMMDDYYYY = "place" & Left(arg1,2) & ".wav,month" & mid(arg1,3,2) & ".wav," & Number(right(arg1,4)) to be: DateMMDDYYYY = "month" & mid(arg1,3,2) & ".wav,place" & Left(arg1,2) & ".wav," & Number(right(arg1,4)) 2. Add a new Say Number function to lib_num2wav.vbs: '###### 'name : Date - DDMMYYYY - MDY 'info : Say month, day, year 'arg1 : DDMMYYYY or DD/MM/YYYY: '###### Function DateMMDDYYYY_MDY(ByVal arg1) arg1 = replace(arg1, "/", "") If Len(arg1) < 8 Then Exit Function End If DateMMDDYYYY_MDY = "month" & mid(arg1,3,2) & ".wav,place" & Left(arg1,2) & ".wav," & Number(right(arg1,4)) End Function Option 2 is a better way to go probably - that way you have the ability to say the date in both ways, depending on which function you select to use in the Say Number module. There is already a function there which will say the month first, but the data needs to be input in MMDDYYYY format. I take it that your data is provided in DDMMYYYY format, correct? Share this post Link to post